package com.estore.converter;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;

public class DateTime {
	public String currentDate() {
		DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		Date date = new Date();
		String currentDate = dateFormat.format(date);
		return currentDate;
	}

	public String getDate(Integer year, Integer month, Integer day) {
		DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
		Date date = new Date(year, month, day);
		String getDate = dateFormat.format(date);
		return getDate;
	}
	
	public String addImgDate(){
		DateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
		Date date = new Date();
		String getDate= dateFormat.format(date);
		return getDate;
	}
}
